1. Field of Invention
This invention relates to storage and retrieval of data in memory, and in particular, to the scaling of external memory.
2. Background of the Invention
In many computing systems, memory is used to hold programs and data that are part of a working set of one or more tasks being performed by the system. The tasks may be performed in a process and/or a thread. The working set of the process and/or the thread may be a set of pages in a virtual address space of the process and/or the thread that are currently resident in the memory as opposed to the set of pages in the virtual address space that are swapped out of the memory. When used for this purpose, the memory is referred to as primary memory, or main memory. In other words, the primary memory may be memory in which the working sets of the processes executed by the system are stored. Primary memory is typically associated with a single computer system and is often physically located inside the computer system or directly attached to computer system's memory controller. In a non-uniform memory access (NUMA) architecture, the computer system may contain multiple CPU's, and each CPU may have some primary memory associated with it and/or directly attached to the CPU's memory controller. Primary memory is often arranged in pages, where a page is a unit of access or control supported by a memory controller. Primary memory is typically comprised of very fast media, such as random access memory (RAM).
Computing systems also typically have a form of secondary memory, which is used to hold programs and data that are not part of the working set of the tasks being performed by the system. The programs and data stored in secondary memory may be stored in a file system or be located in virtual memory pages that have been swapped out of primary memory by a virtual memory system. Virtual memory pages may be stored in a swap partition or in a swap file on a file system. Secondary memory may be associated with one or more computer systems and may be arranged in a variety of ways, such as physically located inside the computer system, directly attached to the CPU bus, attached to a peripheral bus, or connected to a peripheral via a cable or switched fabric. Secondary memory is typically comprised of slower media, such as flash memory or spinning disk.
Typically, primary memory media is more expensive than secondary memory media. Consequently, computing systems may have larger secondary memory capacity and a limited primary memory capacity. The limited primary memory capacity may limit the working set of tasks being performed by the computing system. Increasing the primary memory capacity of the computing system may be prohibitive due to large costs involved. Additionally, the computing system may not have a large number of tasks being performed all the time, and therefore, portions of the primary memory, at times, may not be in use. Thus, large primary memory capacity may not only be expensive, but also not operational all the time.